<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" 
    isELIgnored="false" %>
    
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	算数  <br>
	${1 + 2 * 3 / 4 % 5}  <br>
	关系  <br>
	${ 5 > 3}, ${ 5 gt 3} <br>
	${ 5 >= 3}, ${ 5 ge 3} <br>
	${ 5 < 3}, ${ 5 lt 3} <br>
	${ 5 <= 3}, ${ 5 le 3} <br>
	${ 5 == 3}, ${ 5 eq 3} <br>
	${ 5 != 3}, ${ 5 ne 3} <br>
	三目 <br>
	${ 5 < 3 ? "a": "b"}  <br>
	逻辑 <br>
	${ true && true }, ${ true and true } <br>
	${ true || false },${ true or false } <br>
	${ !true }, ${ not true }<br>
	${ !false }, ${ not false }<br>

	<%
		pageContext.setAttribute("a", "1");
		request.setAttribute("b", "2");
		session.setAttribute("c", "3");
		application.setAttribute("d", "4");
	%>
	四个作用域(默认不写作作用域，从page->request->session->application找):  <br>
	${pageScope.a}  <br>
	${requestScope.b}  <br>
	${sessionScope.c }  <br>
	${applicationScope.d }  <br>

	请求参数: <br>
	<!-- http://localhost:8080/20230706_coco_el/el.jsp?name=a&age=10 -->
	${param.name }, ${param.age } <br>
	<!-- http://localhost:8080/20230706_coco_el/el.jsp?hobby=a&hobby=b -->
	<c:forEach items="${paramValues.hobby}" var="h">
		${h},
	</c:forEach>  <br>
	
	<%
		Cookie c = new Cookie("version","v1.0");
		response.addCookie(c);
	%>
	<!-- 第一次执行往客户端写，第二次执行才能读取到cookie的值 -->
	${cookie.version.name}
	${cookie.version.value}  <br>
	<br>
</body>
</html>